//
//  FYSDKXOREncryption.m
//  FrameworkHome
//
//  Created by Johnny on 16/6/13.
//  Copyright © 2016年 FY65NetWork. All rights reserved.
//

#import "FYSDKXOREncryption.h"

@implementation FYSDKXOREncryption
+(NSString *) encryptDecrypt:(NSString *)input {
    unichar key[] = {'F', 'Y', '6', '5', 'S', 'D', 'K', 'J', 'M', 'C', 'S'}; //Can be any chars, and any size array
    NSMutableString *output = [[NSMutableString alloc] init];
    for(int i = 0; i < input.length; i++) {
        unichar c = [input characterAtIndex:i];
        c ^= key[i % sizeof(key)/sizeof(unichar)];
        [output appendString:[NSString stringWithFormat:@"%C", c]];
    }
    return output;
}
@end
